package com.chai.service.impl;

import com.chai.dao.User;
import com.chai.service.UserService;
/**
 * 通过构造器进行参数的注入
 * */
public class UserServiceImpl implements UserService {
    public User user;
    public int number;

    public UserServiceImpl(User user, int number) {
        this.user = user;
        this.number = number;
    }

    public void save() {
        System.out.println(user+":"+number);
    }
}
